function maintainOption(stationAlarmTop) {
	return {
      color: ['#3398DB'],
      tooltip: {
        trigger: 'axis',
        axisPointer: { // 坐标轴指示器，坐标轴触发有效
            type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
        }
      },
      grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        top:'18%',
        containLabel: true
      },
      xAxis: [{
        type: 'category',
        axisLine: {
          lineStyle: {
            color:'#3398DB',
            width:'1'
          }
        },
        axisLabel: {
          interval:0,
          rotate:40,
          textStyle: {
            color: '#606266'
          }
        },
        data:stationAlarmTop.xData,
        axisTick: {
          alignWithLabel: true,
          lineStyle:{
            color : '#3398DB',
          }
        }
      }],
      yAxis: [{
        name: "（数量）",
        type: 'value',
        nameTextStyle: {
          color: "#606266",
          fontSize: 16
        },
        type: 'value',
        axisLine: {
          lineStyle: {
            color:'#3398DB',
            width:'1'
          }
        },
        axisLabel: {
          textStyle: {
            color: '#606266'
          }
        },
      }],
      series: [{
        name: '站点',
        type: 'bar',
        barWidth: '50%',
        data:stationAlarmTop.yData
      }]
    }
}

function majorOption (dataList,dataValueList) {
	return {
		tooltip: {
			show: true,
			trigger: 'item',
			formatter: "{b}: {c} ({d}%)"
		},
		legend: {
			orient: 'horizontal',
			left: "3%",
			textStyle: {
				color: '#606266',
			},
			// data:['AFC','ATS','PSD','ACS','FAS']
			data:dataList
		},
		series: [
			{
				type:'pie',
				selectedMode: 'single',
				radius : '65%',
				center: ['50%', '60%'],
				avoidLabelOverlap: false,
				color: ["#AF89D6", "#5ab6df", "#6a8bc0", "#4acacb", "#fe8676"],
				label: {
					normal: {
						formatter: "{b}\n{d}%",
						textStyle: {
							color: '#606266',
							fontWeight: "bold",
							fontSize: 12
						}
					}
				},
				itemStyle: {
					normal: {
						label: {
							show: true,
							formatter: "{b} : {c} ({d}%)"
						},
						labelLine: { show: true }
					}
				},
				data:dataValueList
			},
		]
	}
}

function levelOption (dataList,dataValueList) {
	return {
		tooltip : {
			trigger: 'item',
			formatter: "{b} : {c} ({d}%)"
		},
		legend: {
			orient: 'horizontal',
			left: 'left',
			textStyle: {
				color: '#606266',
			},
			data:dataList
		},
		series : [{
			type:'pie',
			radius : '65%',
			center: ['50%', '60%'],
			color: ["#DC143C","#436EEE", "#008fd1", "#e56c00"],
			data:dataValueList,
			itemStyle: {
				emphasis: {
					shadowBlur: 10,
					shadowOffsetX: 0,
					shadowColor: 'rgba(0, 0, 0, 0.5)'
				}
			},
		}]
	}
}

export { //很关键
	maintainOption,
	majorOption,
	levelOption,
}